The system described here is a transmon qubit coupled to a voltage-biased CPW. We are going to model the qubit as a multi-level artificial atom coupled to a single harmonic mode of a superconductor resonator by a Jaynes-Cummings Hamiltonian [1]:
$ \newcommand{\ket}[1]{\left|{#1}\right\rangle} \newcommand{\bra}[1]{\left\langle{#1}\right|} $
$\displaystyle H_{JC} = \hbar\omega_r (a^\dagger a + 1/2) + \hbar\Sigma\omega_j \ket{j}\bra{j} + \hbar\Sigma g_{j,j+1}(a^\dagger\ket{j}\bra{j+1}+a\ket{j+1}\bra{j}) $
where:
This Hamiltonian can be diagonalized in the dispersive limit, $\Delta_{j,j+1} \equiv \omega_{j,j+1} - \omega_r \gg g_{j,j+1}$, resuting in:
$\displaystyle \tilde{H}^{2}_{JC} = \hbar\tilde{\omega}_r (a^\dagger a + 1/2) + \dfrac{\hbar\tilde{\omega}_{ge}}{2}\sigma_z + \hbar\chi (a^\dagger a + 1/2) \sigma_z$
where:
1.Jaynes, E. T. & Cummings, F. W. Comparison of quantum and semiclassical radiation theories with application to the beam maser. Proceedings of the IEEE 51, 89–109 (1963).
In [1]:
#import functions
%pylab inline
from MyUnits import *
from MyFunctions import *
from qutip import *
from MyQubit import *
import mpld3
In [2]:
# %load_ext autoreload
In [3]:
# %aimport MyQubit
# %autoreload 1
$ \displaystyle H_{tot} \approx \hbar \tilde{\Delta}_d\left(a^\dagger a + 1/2\right) + \dfrac{\hbar}{2}\chi(\left(a^\dagger a + 1/2\right)\sigma_z + H_{Kerr}^4+H_{Drive}^2$
Function add to file MyQubit.py
In [4]:
cd /Users/rouxinol/Dropbox/Lab LaHaye/Hugo/2014/12042014
In [5]:
!Head CavityAttn\ MWFreq\ swp\ Flux2pt8\ b
P,F,A,P= ImportXYZZ("/Users/rouxinol/Dropbox/Lab LaHaye/Hugo/2014/12042014/CavityAttn MWFreq swp Flux2pt8 b")
fig, axes = subplots(1,1, figsize=(16,6))
for i in range(6):
plot(F,A[i,])
A0 = dBmtoV(A[0,])
A1 = dBmtoV(A[1,])
A2 = dBmtoV(A[2,])
A3 = dBmtoV(A[3,])
A4 = dBmtoV(A[4,])
A5 = dBmtoV(A[5,])
In [6]:
Ej = 11.55 # Maximum Josephson Energy
Ec = 0.22 # Capacitive Energy
w_ge_max = sqrt(8*Ec*Ej)-Ec
print('Qubit max frequency: ',w_ge_max, 'GHz')
f = 5e9 # GHz
T = 50e-3 # K
n_th_a = 1/(exp(h*f/(kB*T)-1))
print('<n> thermal: ',n_th_a)
From the measurements take in December 2014 the mains system parametes were determined
The resonator bare frequency is $\omega_r$ = 5.049 GHz, with a internal quality factor $Q_I \simeq 200k$, and a loaded quality facot $Q_L \simeq 20k$.
From the resistence of the Josephson resistence a maximum Josephson energy $E_{J,max}/h \approx 11.92$ GHz and a Coulomb charging energy of $E_c/h \approx $ 0.22 GHz (See comments above)
Using these parametes $\chi_{ef}$, $\chi_{ge}$ and $\omega_{ge}$ can be estimated using:
$\chi_{ef} \simeq 2\left(\omega_r - \tilde{\omega}_r\right) $
and
$\chi_{ge} \simeq \chi + \dfrac{\chi_{ef}}{2}$
and finally:
$\omega_{ge} \simeq \tilde{\omega}_{ge} - \chi_{ge}$
$\omega{ef}$ was estimated using two photon spectroscopy of que qubit. We observe $\dfrac{\tilde{\omega}_{gf}}{2} \simeq $ 4.245 GHz one gets $\omega_{gf} \simeq$ 8.49 GHz; using:
$\tilde{\omega}_{gf} \simeq \tilde{\omega}_{ge}+\tilde{\omega}_{ef}$
$\tilde{\omega}_{ef} \simeq \tilde{\omega}_{gf}-\tilde{\omega}_{ge} \approx \omega_{ef}$
In [7]:
# Measured data
w_r = (5.049) *2 * pi # bare resonator frequency
Q_l = 20000 # resonator loaded quality factor
w_r_tilde = (5.065) * 2 * pi # max cavity frequency change
chi = -(0.0054) * 2 * pi # Change in the spectroscopy peaks -> 2*n*Chi = 4.35 - 4.3
w_ge_tilde = (4.365) *2 * pi # Dressed qubit frequency |g> -> |e>
w_gf_tilde = 2 * (4.245) *2 * pi # Dressed qubit frequency |g> -> |f>
# Derived data
chi_ef = 2*(w_r - w_r_tilde)
print('Chi_ef/2pi = ',chi_ef/2/pi, 'GHz')
chi_ge = chi + chi_ef/2
print('Chi_ge/2pi = ', chi_ge/2/pi, 'GHz\n')
w_ge = w_ge_tilde - chi_ge
print('qubit bare frequency: w_ge/2pi =', w_ge/2/pi, 'GHz')
w_ef = w_gf_tilde - w_ge_tilde # qubit e -> f transition
print('qubit |e> -> |f> frequency: w_ef/2pi =', w_ef/2/pi, 'GHz\n')
Delta_ge = w_ge - w_r # g -> e detunning
print('Detunning |g> -> |e>: Delta_ge/2pi =', Delta_ge/2/pi,'GHz')
Delta_ef = w_ef - w_r # g -> e detunning
print('Detunning |e> -> |f>: Delta_ef/2pi =', Delta_ef/2/pi,'GHz\n')
g_ge = sqrt(chi_ge * Delta_ge)
print('Coupling strength |g> -> |e>: g_ge/2pi =', (g_ge/2/pi),'GHz')
g_ef = sqrt(chi_ef * Delta_ef)
print('Coupling strength |e> -> |f>: g_ef/2pi =', (g_ef/2/pi),'GHz\n')
In [8]:
# lambda expansion parameter
lambda_ge = g_ge/Delta_ge # expansion parameter lambda << 1
print('Expansion parameter |g> -> |e> << 1: ', lambda_ge, ' << 1')
lambda_ef = g_ef/Delta_ef # expansion parameter lambda << 1
print('Expansion parameter |e> -> |f> << 1: ', lambda_ef, ' << 1 \n')
The general drive Hamiltonian $\displaystyle H_{drive}$ in the dispersive regime result in a Kerr-type nonlinearities Hamiltonian $H_{Kerr}^{(4)}$ and a Hamiltonian to the cavity and qubit tones $H_{drive}^{(2)}$, where:
$H_{Kerr}^{(4)} \simeq \hbar \zeta \left(a^\dagger a + 1/2\right)^2\sigma_z + \hbar\zeta'\left(a^\dagger a + 1/2\right)^2$
with
$\zeta \approx \chi_{ef}\lambda_{ef}^2 - 2\chi_{ge}\lambda_{ge}^2 + \dfrac{7\chi_{ef}\lambda_{ge}^2}{4} -\dfrac{5\chi_{ge}\lambda_{ef}^2}{4}$
and
$ \zeta' \approx \left(\chi_{ge}-\chi_{ef}\right)\left(\lambda_{ge}^2+\lambda_{ef}^2\right)$
and
$H_{drive}^{(2)} = \dfrac{\hbar}{2}\Omega_d (a^\dagger + a) + \dfrac{\hbar}{2}\Omega_s (\sigma^+ + \sigma^-) $
where
$\Omega_s/\Omega_d$ are the amplitudes of the qubit/resonator.
In [9]:
zeta_1 = chi_ef * lambda_ef**2 - 2 * chi_ge * lambda_ge**2 + (7 * chi_ef*lambda_ge**2 - 5 * chi_ge * lambda_ef**2)/4
print('cross-Kerr coeficient: Zeta_1/2pi =', zeta_1/2/pi, 'GHz')
zeta_2 = (chi_ge - chi_ef ) * (lambda_ge**2 + lambda_ef**2)
print('self-Kerr coeficient: Zeta_2/2pi =', zeta_2/2/pi, 'GHz\n')
Relaxation and Dephasing of the qubit and the resonator dissipation are accounted in the master equation through:
The effects of the finite temperature are incorporated to the master equation through:
where $\dfrac{\kappa_p}{\kappa_n}\simeq\exp\left({\dfrac{\hbar\omega_r}{k_BT}}\right)$ and $\dfrac{\Gamma_p}{\Gamma_n}\simeq\exp\left({\dfrac{\hbar\omega_{ge}}{k_BT}}\right)$
Qubit relaxation time was measured to be: $T_1 = 4.3 \mu$s
From Rabi measurements the Rabi decay time was measure to be: $T_{Rabi} = 5.8 \mu$s, and Rabi frequency of: $f_{Rabi} = 2.42$MHz with $\bar{n}_s \simeq 1500$ photons
Using
In [10]:
Temp = 20e-3 # temperature in Kelvin
T_1 = 4300 # qubit relaxation time
print('T_1=',T_1*1e-9, 's\n')
Delta_w_ge = (0.0002) *2 * pi # Spectroscopy HWHM lowest <n> Stark shift peak
T_2_star = 1/Delta_w_ge
print('T_2_star =', T_2_star*1e-9, 's\n')
T_rabi = 5800 # Rabi decay time
print('T_rabi=',T_rabi*1e-9, 's')
w_rabi = (0.00248) * 2 * pi # Rabi frequency time
print('w_rabi/2pi =',w_rabi/2/pi, 'GHz\n')
T_dep = 2*T_2_star*T_1/(2*T_1 - T_2_star)
print('T_dephasing =', T_dep*1e-9 , 's\n')
kappa_n = w_r/Q_l # resonator dissipation
print('Resonator dissipation k-/2pi =',kappa_n/2/pi, 'GHz\n')
gamma_rel = 1/T_1
print('Qubit Relaxarion: Gamma_rel =',gamma_rel, 'GHz\n')
gamma_dep = 1/T_dep
print('Qubit dephasing: Gamma_def =',gamma_dep, 'GHz\n')
In [11]:
# basic parameters
w_d = 5.066 * 2 * pi # resonator drive frequency
w_s = 4.36 * 2 * pi # qubit drive frequency
# derivated parameters
# Delta tilde parameters
Delta_d_tilde = w_r_tilde - w_d
print('Detuning of the dressed resonator/2pi: ', Delta_d_tilde/2/pi)
Delta_s_tilde = w_ge_tilde - w_s
print('Detuning of the dressed qubit/2pi: ', Delta_s_tilde/2/pi, '\n')
The cavity mean occupancy is:
$$ \bar{n}=\dfrac{P_{out}Q}{2\pi f hf} $$Using Blais et al. (PRA 062320 (2004))
$$ \left<n\right> = \dfrac{2P}{\hbar\omega_r\kappa} $$Also from Blais et al.
$$ \left< V_{out} \right> = \sqrt{R\hbar\omega_r\kappa}\dfrac{\left(a^{\dagger}+a\right)}{2} $$
In [12]:
p_out = linspace(-111,-151,9)
f = w_r/2/pi*1e9
Q_c = 20000 # External coupling # from arxiv 1308.2245v1 Suri et alli (??? add by hand)
n_mean = dBmtoW(p_out)*Q_l/(pi*f*h*f) # standard equation
n_mean_2 = 2*Q_l*dBmtoW(p_out)/(hbar*w_r_tilde*1e9*kappa_n*1e9)/Q_c # from arxiv 1308.2245v1 Suri et alli
n_mean_3 = Q_c*kappa_n*1e9*dBmtoW(p_out)/(2*Q_l*hbar*w_r_tilde*1e9)/((kappa_n*1e9/2)**2+(Delta_d_tilde*1e9-chi*1e9)**2) # from arxiv 1308.2245v1 Suri et alli
n_mean_4 = 2*dBmtoW(p_out)/(hbar*w_r*1e9*kappa_n*1e9)
In [13]:
print('Power => <n> => <n2> => <n3> => <n4> ')
for i in range(len(p_out)):
print(p_out[i], ' => ',n_mean[i],' => ', n_mean_2[i] ,' => ', n_mean_3[i],' => ', n_mean_4[i])
$\Omega_d \simeq \left(\dfrac{Q_C\kappa_- P_{RF}}{2Q_L\hbar\tilde{\omega}_r}\right)^{1/2}$
In [14]:
P_qubit = -140 # Input power qubit (0-20-20-76 - cavity(?))
P_cavity = -(106 + 32) # Input power cavity
Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_cavity)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
print('Drive amplitude cavity =',Gamma_d/2/pi, 'GHz')
Gamma_s = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_qubit)/(2*Q_l*hbar*w_ge_tilde*1e9))/1e9 # Drive amplitude cavity ????
print('Drive amplitude qubit =',Gamma_s/2/pi,'GHz')
In [15]:
tlist = None
In [101]:
N = 20 # number of states cavity
f_d_i = 5.058 # cavity initial frequency
f_d_f = 5.062# cavity final frequency
steps_d = 200
w_d = 2 * pi * linspace(f_d_i,f_d_f,steps_d)
f_s_i = 4.2 # qubit initial freq
f_s_f = 4.4 # qubit final freq
steps_s = 300
w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
amp_sz = []
amp_n = []
amp_x = []
for wr in w_d:
for wq in w_s:
Delta_d_tilde = w_r_tilde - wr
Delta_s_tilde = w_ge_tilde - wq
rho,temp, temp2, temp3 = calc_spectrum(N,tlist,Delta_d_tilde,Delta_s_tilde,chi,Gamma_d,Gamma_s, zeta_1,zeta_2,kappa_n,gamma_rel,gamma_dep,n_th_a)
amp_sz.append((temp.tr()))
amp_n.append((temp2.tr()))
amp_x.append((temp3.tr()))
In [102]:
Tr_sz = reshape(amp_sz,(-1,len(w_s)))
Tr_n = reshape(amp_n,(-1,len(w_s)))
In [102]:
In [103]:
fig, ax = subplots(1,2, figsize=(16,10))
im = ax[0].pcolor(w_s/2/pi, w_d/2/pi ,(abs(Tr_sz)))#,vmin=0, vmax=1)
ax[0].set_xlim(f_s_i,f_s_f)
ax[0].set_ylim(f_d_i,f_d_f)
ax[0].set_ylabel(r'Cavity tone frequency (GHz)')
ax[0].set_xlabel(r'Qubit tone frequency (GHz)')
fig.colorbar(im, ax=ax[0])
im2 = ax[1].pcolor(w_s/2/pi, w_d/2/pi ,(abs(Tr_n)))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[1])
ax[1].set_xlim(f_s_i,f_s_f)
ax[1].set_ylim(f_d_i,f_d_f)
ax[1].set_ylabel(r'Cavity tone frequency (GHz)')
ax[1].set_xlabel(r'Qubit tone frequency (GHz)')
Out[103]:
In [ ]:
# mpld3.display(fig)
In [97]:
N = 20 # number of states cavity
P_cavity = -(106 + 32) # Input power cavity
Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_cavity)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
print('Drive amplitude cavity =',Gamma_d/2/pi, 'GHz')
# w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
wr = (5.0596) * 2* pi
Delta_d_tilde = w_r_tilde - wr
# qubit freq scan
f_s_i = 4.2 # qubit initial freq
f_s_f = 4.4 # qubit final freq
steps_s = 200
w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
# Power scan
P_i = -110 # qubit tone start
P_f = -160 # qubit tone final
steps_p = 50 #
P_qubit = linspace(P_i,P_f, steps_p)
amp_sz = []
amp_n = []
amp_x = []
amp_a = []
for Pq in P_qubit:
for wq in w_s:
Delta_s_tilde = w_ge_tilde - wq
Gamma_s = sqrt(Q_c*kappa_n*1e9*dBmtoW(Pq)/(2*Q_l*hbar*w_ge_tilde*1e9))/1e9
rho,temp, temp2, temp3, temp4 = calc_spectrum(N,tlist,Delta_d_tilde,Delta_s_tilde,chi,Gamma_d,Gamma_s, zeta_1,zeta_2,kappa_n,gamma_rel,gamma_dep,n_th_a)
amp_sz.append((temp.tr()))
amp_n.append((temp2.tr()))
amp_x.append((temp3.tr()))
amp_a.append((temp4.tr()))
In [98]:
Tr_sz = reshape(amp_sz,(-1,len(w_s+1)))
Tr_n = reshape(amp_n,(-1,len(w_s+1)))
Tr_x = reshape(amp_x,(-1,len(w_s+1)))
Tr_a = reshape(amp_a,(-1,len(w_s+1)))
In [99]:
Tr_sz.shape, P_qubit.shape,w_s.shape
Out[99]:
In [100]:
fig, ax = subplots(2,2, figsize=(16,10))
im = ax[0,0].pcolor( w_s/2/pi,P_qubit,abs(Tr_sz))#,vmin=0, vmax=1)
fig.colorbar(im, ax=ax[0,0])
ax[0,0].set_xlim(4.27,4.39)
ax[0,0].set_ylim(P_i,P_f)
ax[0,0].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[0,0].set_xlabel(r'Qubit Tone Frequency (GHz)',fontsize=10)
ax[0,0].set_title(r'$Tr[\rho\sigma_z]$',fontsize=20)
im2 = ax[0,1].pcolor(w_s/2/pi,P_qubit,abs(Tr_n))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[0,1])
ax[0,1].set_ylim(P_i,P_f)
ax[0,1].set_xlim(4.27,4.39)
ax[0,1].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[0,1].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=10)
ax[0,1].set_title(r'$Tr[\rho {a^{\dagger}a}]$',fontsize=20)
im3 = ax[1,0].pcolor(w_s/2/pi,P_qubit,-abs(Tr_x))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[1,0])
ax[1,0].set_ylim(P_i,P_f)
ax[1,0].set_xlim(4.27,4.39)
ax[1,0].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[1,0].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=10)
ax[1,0].set_title(r'$Tr[\rho (a^{\dagger} + a)]$',fontsize=20)
im3 = ax[1,1].pcolor(w_s/2/pi,P_qubit,abs(Tr_a))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[1,1])
ax[1,1].set_ylim(P_i,P_f)
ax[1,1].set_xlim(4.27,4.39)
ax[1,1].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[1,1].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=10)
ax[1,1].set_title(r'$Tr[\rho a]$',fontsize=20)
Out[100]:
In [101]:
# mpld3.display(fig)
fig, ax = subplots(1,1, figsize=(16,10))
im = ax.pcolor( w_s/2/pi,P_qubit,abs(Tr_sz))#,vmin=0, vmax=1)
fig.colorbar(im, ax=ax)
ax.set_xlim(4.27,4.39)
ax.set_ylim(P_i,P_f)
ax.set_ylabel(r'Qubit Tone Power(dBm)',fontsize=20)
ax.set_xlabel(r'Qubit Tone Frequency (GHz)',fontsize=20)
ax.set_title(r'$Tr[\rho\sigma_z]$',fontsize=20)
Out[101]:
In [61]:
N = 20 # number of states cavity
P_qubit = -140 # Input power qubit (0-20-20-76 - cavity(?))
# P_cavity = -(106 + 30) # Input power cavity
# Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_cavity)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
# print('Drive amplitude cavity =',Gamma_d/2/pi, 'GHz')
Gamma_s = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_qubit)/(2*Q_l*hbar*w_ge_tilde*1e9))/1e9 # Drive amplitude cavity ????
print('Drive amplitude qubit =',Gamma_s/2/pi,'GHz')
# # qubit tone
# f_s_i = 4.3 # qubit initial freq
# f_s_f = 4. # qubit final freq
# steps_s = 50 # steps qubit tone
# w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
wr = (5.0596) * 2* pi
Delta_d_tilde = w_r_tilde - wr
# qubit freq scan
f_s_i = 4.2 # qubit initial freq
f_s_f = 4.4 # qubit final freq
steps_s = 500
w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
# Power scan
P_i = -160 # qubit tone start
P_f = -130 # qubit tone final
steps_p = 50 #
P_cavity = linspace(P_i,P_f, steps_p)
rho_matrix = []
amp_sz = []
amp_n = []
amp_x = []
amp_a = []
for Pc in P_cavity:
for wq in w_s:
Delta_s_tilde = w_ge_tilde - wq
Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(Pc)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
rho,temp, temp2, temp3, temp4 = calc_spectrum(N,tlist,Delta_d_tilde,Delta_s_tilde,chi,Gamma_d,Gamma_s, zeta_1,zeta_2,kappa_n,gamma_rel,gamma_dep,n_th_a)
# rho_matrix.append(rho)
amp_sz.append((temp.tr()))
amp_n.append((temp2.tr()))
amp_x.append((temp3.tr()))
amp_a.append((temp4.tr()))
In [62]:
Tr_sz = reshape(amp_sz,(-1,len(w_s+1)))
Tr_n = reshape(amp_n,(-1,len(w_s+1)))
Tr_x = reshape(amp_x,(-1,len(w_s+1)))
Tr_a = reshape(amp_a,(-1,len(w_s+1)))
In [63]:
Tr_sz.shape,Tr_n.shape,Tr_x.shape, Tr_a.shape,w_s.shape,P_cavity.shape
Out[63]:
In [64]:
fig, ax = subplots(2,2, figsize=(16,10))
im = ax[0,0].pcolor(w_s/2/pi,P_cavity,abs(Tr_sz))#,vmin=0, vmax=1)
fig.colorbar(im, ax=ax[0,0])
ax[0,0].set_xlim(4.27,4.39)
ax[0,0].set_ylim(P_i,P_f)
ax[0,0].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[0,0].set_xlabel(r'Qubit Tone Frequency (GHz)',fontsize=10)
ax[0,0].set_title(r'$Tr[\rho\sigma_z]$',fontsize=20)
im2 = ax[0,1].pcolor(w_s/2/pi,P_cavity,abs(Tr_n))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[0,1])
ax[0,1].set_ylim(P_i,P_f)
ax[0,1].set_xlim(4.27,4.39)
ax[0,1].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[0,1].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=10)
ax[0,1].set_title(r'$Tr[\rho {a^{\dagger}a}]$',fontsize=20)
im3 = ax[1,0].pcolor(w_s/2/pi,P_cavity,abs(Tr_x))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[1,0])
ax[1,0].set_ylim(P_i,P_f)
ax[1,0].set_xlim(4.27,4.39)
ax[1,0].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[1,0].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=10)
ax[1,0].set_title(r'$Tr[\rho (a^{\dagger} + a)]$',fontsize=20)
im3 = ax[1,1].pcolor(w_s/2/pi,P_cavity,abs(Tr_a))#,vmin=0, vmax=1)
fig.colorbar(im2, ax=ax[1,1])
ax[1,1].set_ylim(P_i,P_f)
ax[1,1].set_xlim(4.27,4.39)
ax[1,1].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=10)
ax[1,1].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=10)
ax[1,1].set_title(r'$Tr[\rho a]$',fontsize=20)
# fig, ax = subplots(1,3, figsize=(16,5))
# im = ax[0].pcolor( w_s/2/pi,P_cavity,abs(Tr_sz))#,vmin=0, vmax=1)
# fig.colorbar(im, ax=ax[0])
# ax[0].set_xlim(4.27,4.39)
# ax[0].set_ylim(P_i,P_f)
# ax[0].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=20)
# ax[0].set_xlabel(r'Qubit Tone Frequency (GHz)',fontsize=20)
# ax[0].set_title(r'$Tr[\rho\sigma_z]$',fontsize=20)
# im2 = ax[1].pcolor(w_s/2/pi,P_cavity,abs(Tr_n))#,vmin=0, vmax=1)
# fig.colorbar(im2, ax=ax[1])
# ax[1].set_ylim(P_i,P_f)
# ax[1].set_xlim(4.27,4.39)
# ax[1].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=20)
# ax[1].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=20)
# ax[1].set_title(r'$Tr[\rho {a^{\dagger}a}]$',fontsize=20)
# im3 = ax[2].pcolor(w_s/2/pi,P_cavity,abs(Tr_x))#,vmin=0, vmax=1)
# fig.colorbar(im2, ax=ax[1])
# ax[2].set_ylim(P_i,P_f)
# ax[2].set_xlim(4.27,4.39)
# ax[2].set_ylabel(r'Qubit Tone Power(dBm)',fontsize=20)
# ax[2].set_xlabel(r'Qubit Tone Frequency (GHz)', fontsize=20)
# ax[2].set_title(r'$Tr[\rho {a^{\dagger} + a}]$',fontsize=20)
Out[64]:
In [95]:
# Test
t = 20
print(P_cavity[t])
File = A0
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+4e6,-(Tr_x[t]),'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
# axes.set_ylim(0.3,1.5) # simulation
# axes0.set_ylim(0,2) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[95]:
In [96]:
###A0
t = 30
print(P_cavity[t])
File = A0
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+4e6,abs(Tr_sz[t]),'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
axes.set_ylim(0.3,1.5) # simulation
axes0.set_ylim(0,2) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[96]:
In [46]:
###A1
t = 31
print(P_cavity[t])
File = A1
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+4e6,Tr_sz[t],'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
axes.set_ylim(0.25,1.35) # simulation
axes0.set_ylim(0,3) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[46]:
In [47]:
###A2
t = 43
print(P_cavity[t])
File = A2
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+15e6,Tr_sz[t],'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
axes.set_ylim(0.65,1.02) # simulation
axes0.set_ylim(0,5) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[47]:
In [48]:
###A3
t = 44
print(P_cavity[t])
File = A3
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+15e6,Tr_sz[t],'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
axes.set_ylim(0.7,1.0) # simulation
axes0.set_ylim(0,7) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[48]:
In [49]:
###A4
t = 45
print(P_cavity[t])
File = A4
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+13.7e6,Tr_sz[t],'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
axes.set_ylim(0.7,1.03) # simulation
axes0.set_ylim(0,9) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[49]:
In [50]:
###A5
t = 46
print(P_cavity[t])
File = A5
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# fig.subplots_adjust(left=0, wspace=0.25
axes.plot(1e9*w_s/2/pi+12e6,Tr_sz[t],'k-',linewidth=3)
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
#####
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'ro', label='data' )
# axes.legend(loc=2)
#left plot
axes.set_ylim(0.74,1.01) # simulation
axes0.set_ylim(0,10) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
plot(w_s/2/pi,abs(Tr_sz[t]))
Out[50]:
In [263]:
P_qubit = -140 # Input power qubit (0-20-20-76 - cavity(?))
P_cavity = -(106 + 30) # Input power cavity
Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_cavity)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
print('Drive amplitude cavity =',Gamma_d/2/pi, 'GHz')
Gamma_s = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_qubit)/(2*Q_l*hbar*w_ge_tilde*1e9))/1e9 # Drive amplitude cavity ????
print('Drive amplitude qubit =',Gamma_s/2/pi,'GHz')
N = 20 # number of states cavity
wr = (5.0596) *2*pi
Delta_d_tilde = w_r_tilde - wr
w_s = 2 * pi * linspace(f_s_i,f_s_f,500)
amp1 = []
amp2 = []
for wq in w_s:
Delta_s_tilde = w_ge_tilde - wq
rho, temp, temp2 = calc_spectrum(N,tlist,Delta_d_tilde,Delta_s_tilde,chi,Gamma_d,Gamma_s, zeta_1,zeta_2,kappa_n,gamma_rel,gamma_dep,n_th_a)
amp1.append((temp.tr()))
amp2.append((temp2.tr()))
fig, axes = plt.subplots(1, 2, figsize=(16,6))
axes[0].plot(w_s/2/pi,amp1)
axes[0].set_ylabel('Cavity Pump frequency (GHz)')
axes[0].set_xlabel('Qubit Pump frequency (GHz)')
axes[1].plot(w_s/2/pi,amp2)
axes[1].set_ylabel('Cavity Pump frequency (GHz)')
axes[1].set_xlabel('Qubit Pump frequency (GHz)')
# axes[1].title()
#___________________________________________________#######
rho.ptrace(0).diag()
fig, axes = plt.subplots(1, 2, figsize=(16,6))
xvec = np.linspace(-5,5,200)
rho_cavity = rho.ptrace(0)
W = wigner(rho_cavity, xvec, xvec)
wlim = abs(W).max()
axes[1].contourf(xvec, xvec, W, 100, norm=mpl.colors.Normalize(-wlim,wlim), cmap=plt.get_cmap('RdBu'))
axes[1].set_xlabel(r'Im $\alpha$', fontsize=18)
axes[1].set_ylabel(r'Re $\alpha$', fontsize=18)
axes[0].bar(arange(0, N), real(rho_cavity.diag()), color="blue", alpha=0.6)
axes[0].set_xlabel(r'$n$', fontsize=18)
axes[0].set_ylabel(r'Occupation probability', fontsize=18)
axes[0].set_ylim(0, 1)
axes[0].set_xlim(0, N);
In [628]:
#
fig, axes = subplots(1,2, figsize=(16,6),sharex=True)
# a = 4200
# b = 4400
File = A5
fig.subplots_adjust(left=0, wspace=0.25)
axes0 = axes[0].twinx()
axes0.plot(F,(File)*1e6,'r*', label='data' )
axes0.set_ylabel(r'$\mu V$', fontsize=18)
axes0.legend(loc=0)
axes[0].plot(1e9*w_s/2/pi+4e6, (amp1),'k-',linewidth=2,label='Simulation')
axes[0].set_xlabel(r'f (GHz)', fontsize=18)
axes[0].set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes[0].set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
axes[0].legend(loc=2)
# Graphic right
axes[1].plot(1e9*w_s/2/pi+4e6, (amp2),'k-',linewidth=2, label='Simulation')
axes[1].set_xlabel(r'f (GHz)', fontsize=18)
axes[1].set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes[1].set_title(r'$Tr[\rho {a^{\dagger}a}]$',fontsize=20)
axes[1].legend(loc=0)
axes1 = axes[1].twinx()
axes1.plot(F,(File)*1e6,'r*', label='data')
axes1.set_ylabel(r'$\mu V$', fontsize=18)
axes1.legend(loc=2)
#left plot
axes[0].set_ylim(0.5,1.08) # simulation
axes0.set_ylim(2,9) # data
# right plot
axes[1].set_ylim(3.9,5.35) #simulation
axes1.set_ylim(2,9) # Data
axes1.set_xlim(4.25*1e9,4.40*1e9);
In [36]:
P_qubit = -140 # Input power qubit (0-20-20-76 - cavity(?))
P_cavity = -(106 + 26) # Input power cavity
Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_cavity)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
print('Drive amplitude cavity =',Gamma_d/2/pi, 'GHz')
Gamma_s = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_qubit)/(2*Q_l*hbar*w_ge_tilde*1e9))/1e9 # Drive amplitude cavity ????
print('Drive amplitude qubit =',Gamma_s/2/pi,'GHz')
N = 20 # number of states cavity
f_center = 5.0597
Delta_f = 0.0002
f_d_i = f_center - Delta_f # cavity initial frequency
f_d_f = f_center + Delta_f# cavity final frequency
steps_d = 6
w_d = 2 * pi * linspace(f_d_i,f_d_f,steps_d)
f_s_i = 4.2 # qubit initial freq
f_s_f = 4.4 # qubit final freq
steps_s = 500
w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
amp_1a = []
amp_1b = []
for wr in w_d:
for wq in w_s:
Delta_d_tilde = w_r_tilde - wr
Delta_s_tilde = w_ge_tilde - wq
rho,temp, temp2 = calc_spectrum(N,tlist,Delta_d_tilde,Delta_s_tilde,chi,Gamma_d,Gamma_s, zeta_1,zeta_2,kappa_n,gamma_rel,gamma_dep,n_th_a)
amp_1a.append((temp.tr()))
amp_1b.append((temp2.tr()))
Tr_sz = reshape(amp_1a,(-1,len(w_s+1)))
Tr_n = reshape(amp_1b,(-1,len(w_s+1)))
In [37]:
fig, ax = subplots(1,2, figsize=(16,10))
im = ax[0].pcolor(w_s/2/pi, w_d/2/pi ,(abs(Tr_sz)))#,vmin=0, vmax=1)
ax[0].set_xlim(f_s_i,f_s_f)
ax[0].set_ylim(f_d_i,f_d_f)
ax[0].set_ylabel(r'Cavity tone frequency (GHz)')
ax[0].set_xlabel(r'Qubit tone frequency (GHz)')
fig.colorbar(im, ax=ax[0])
Out[37]:
In [71]:
mean_sz = []
mean_sz = Tr_sz.mean(axis=0,)
Tr_sz.shape
Out[71]:
In [39]:
fig, axes = plt.subplots(1, 1, figsize=(16,6))
for i in range(steps_d):
axes.plot(w_s/2/pi,Tr_sz[i])
axes.plot(w_s/2/pi,mean_sz,'ko')
Out[39]:
In [40]:
#
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# a = 4200
# b = 4400
File = A3
fig.subplots_adjust(left=0, wspace=0.25)
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'r*', label='data' )
# axes0.set_ylabel(r'$\mu V$', fontsize=18)
# axes0.legend(loc=0)
axes.plot(1e9*w_s/2/pi+4e6, (mean_sz),'k--',linewidth=2,label='Simulation')
for i in range(steps_d):
axes.plot(1e9*w_s/2/pi+3e6,Tr_sz[i])
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
# axes.legend(loc=2)
# Graphic right
#left plot
axes.set_ylim(0,1.15) # simulation
axes0.set_ylim(0,9) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
In [112]:
mean_sz = (Tr_sz[4]+ Tr_sz[5] )/2#+ Tr_sz[2]+Tr_sz[3]+Tr_sz[4] +Tr_sz[5])/6
In [113]:
#
fig, axes = subplots(1,1, figsize=(16,6),sharex=True)
# a = 4200
# b = 4400
File = A2
fig.subplots_adjust(left=0, wspace=0.25)
axes0 = axes.twinx()
axes0.plot(F,(File)*1e6,'r*', label='data' )
# axes0.set_ylabel(r'$\mu V$', fontsize=18)
# axes0.legend(loc=0)
axes.plot(1e9*w_s/2/pi+4e6, (mean_sz),'k--',linewidth=2,label='Simulation')
# for i in range(steps_d):
# axes.plot(1e9*w_s/2/pi+3e6,Tr_sz[i])
axes.set_xlabel(r'f (GHz)', fontsize=18)
axes.set_ylabel(r'$Tr[\rho \sigma_z]$ or $Tr[\rho a^{\dagger}a]$ ', fontsize=18)
axes.set_title(r'$Tr[\rho \sigma_z]$',fontsize=20)
# axes.legend(loc=2)
# Graphic right
#left plot
axes.set_ylim(0.65,1.1) # simulation
axes0.set_ylim(0,5) # data
axes0.set_xlim(4.25*1e9,4.40*1e9);
In [102]:
N = 20 # number of states cavity
P_cavity = -(106 + 32) # Input power cavity
Gamma_d = sqrt(Q_c*kappa_n*1e9*dBmtoW(P_cavity)/(2*Q_l*hbar*w_r_tilde*1e9))/1e9 # Drive amplitude qubit
print('Drive amplitude cavity =',Gamma_d/2/pi, 'GHz')
# w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
wr = (5.0596) * 2* pi
Delta_d_tilde = w_r_tilde - wr
# qubit freq scan
f_s_i = 4.2 # qubit initial freq
f_s_f = 4.4 # qubit final freq
steps_s = 200
w_s = 2 * pi * linspace(f_s_i,f_s_f,steps_s)
# Power scan
P_i = -110 # qubit tone start
P_f = -160 # qubit tone final
steps_p = 50 #
P_qubit = linspace(P_i,P_f, steps_p)
amp_sz = []
amp_n = []
amp_x = []
amp_a = []
for Pq in P_qubit:
for wq in w_s:
Delta_s_tilde = w_ge_tilde - wq
Gamma_s = sqrt(Q_c*kappa_n*1e9*dBmtoW(Pq)/(2*Q_l*hbar*w_ge_tilde*1e9))/1e9
rho,temp, temp2, temp3, temp4 = calc_spectrum_2(N,Delta,w_q,Delta_d_tilde,Delta_s_tilde,chi,Gamma_d,Gamma_s, zeta_1,zeta_2,kappa_n,gamma_rel,gamma_dep, n_th_a)
amp_sz.append((temp.tr()))
amp_n.append((temp2.tr()))
amp_x.append((temp3.tr()))
amp_a.append((temp4.tr()))
In [ ]: